The present invention relates generally to database management, and more particularly, to an object identifier distribution method and system in a distributed database system.
Computer databases are essential elements of many computer networks. Large amounts of information can be continuously stored and updated in the databases during the operation of the network. In database management, activities performed on the database have been identified by an object identifier, or xe2x80x9cobjidxe2x80x9d.
In a distributed database system, the database may serve a multitude of disassociated application servers. With distributed databases, however, there are a limited number of objids available. Although in rudimentary databases this limitation is of no concern, but in larger, complex databases, such as those deployed in commercial transactions with numerous database management activities referenced by objids, this limitation could hinder the operation of the database by running out of objids. What is needed, therefore, is an efficient method to distribute and reuse the objids in a database system.
A method and system is provided for distributing and reusing object identifiers in a distributed database system. In one embodiment, the object identifiers are correlated to data types. A first list of object identifiers created by the database is maintained for supplying unallocated object identifiers for each type. A second list of object identifiers is also maintained containing reusable and distributable object identifiers to one or more application servers in the database system. The application server obtains a predetermined number of object identifiers from the first and second lists to be stored in each of the application servers for servicing client applications related to the application server. The second list of object identifiers is a preferred source to obtain the object identifiers over the first list in order to take advantage of existing and reusable identifiers. Unused identifiers are returned from the application servers to the second list after their operations are terminated.
Since the second list of object identifiers contains reusable object identifiers, the application servers searches for needed object identifiers from the second list if possible. If it is not possible to get the needed identifiers from the second list, the first list is used to generate new object identifiers to meet the need. Every time the application server requests the object identifiers from the first list, a predetermined number of additional object identifiers are obtained to be stored in the application server for its future use.